package com.android.powerbankpad.network.retrofit;


import com.android.powerbankpad.download.DownObservable;

public class ApiUtils {
    //    private Retrofit retrofit;
    private DownObservable mApiService;
    static volatile ApiUtils defaultInstance;

    private ApiUtils() {
        mApiService = RetrofitServiceManager.getInstance().createService(DownObservable.class);
    }

    //获取单例
    public static ApiUtils getInstance() {
        if (defaultInstance == null) {
            synchronized (ApiUtils.class) {
                if (defaultInstance == null) {
                    defaultInstance = new ApiUtils();
                }
            }
        }
        return defaultInstance;
    }

    /**
     * 获取httpService
     */
    public DownObservable getApiService() {
        return mApiService;
    }


}
